# Contributor: Kaarle Ritvanen <kunkku@alpinelinux.org>
# Maintainer: Kaarle Ritvanen <kunkku@alpinelinux.org>
pkgname=py3-django-oscar
pkgver=3.1
pkgrel=2
pkgdesc="Domain-driven e-commerce for Django"
url="http://oscarcommerce.com/"
arch="noarch"
license="BSD-3-Clause"
depends="py3-babel py3-django py3-django-extra-views py3-django-haystack
         py3-django-phonenumber-field py3-django-sorl-thumbnail
         py3-django-tables2 py3-django-treebeard py3-django-widget-tweaks
         py3-factory-boy py3-pillow py3-purl"
makedepends="gettext py3-setuptools"
source="https://files.pythonhosted.org/packages/source/d/django-oscar/django-oscar-$pkgver.tar.gz
	0001-Fix-stacked-display-of-categories-without-children-i.patch
	0001-Fix-page-query-parameter-in-pagination-templates.patch
	"
builddir="$srcdir/django-oscar-$pkgver"

replaces="py-django-oscar" # Backwards compatibility
provides="py-django-oscar=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare
	django-admin compilemessages
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

package() {
	python3 setup.py install --root "$pkgdir"
}

sha512sums="
513226ab921c28acbd84bdfad4bf51e8647211995f39caaa23895fc02f4cf48c7717b43311e9a2bfc54a53f8f16a462ca1d06702aff2380b65c6f884fa12aa91  django-oscar-3.1.tar.gz
7c0ce7cdb8f28a95bf88cc07bdd3603a1be140e186b9be8818a1817c13d6259679b594bb64104be65a669d3ad15705122a12d7a7c204e89f740bc7bd4739e416  0001-Fix-stacked-display-of-categories-without-children-i.patch
660f43dd1b6e580a8c60fcb85d8d88c4ba5e0a6a8c10a9487687f9e15a13068fc5a1bda5a7be350cd4e518547d3446e53a63845e94b516590fa9b69d4c242611  0001-Fix-page-query-parameter-in-pagination-templates.patch
"
